package com.birdpiss.commons.domain;

import java.io.Serializable;

/**
 * The Class Account.
 *
 * @author mark
 */
public class Account implements Serializable {

	private static final long serialVersionUID = 8368563075507229710L;
	private Integer id;
	private String routingNumber;
	private String accountNumber;
	private AccountType accountType;

	/**
	 * Instantiates a new account.
	 */
	public Account() {
		this(null, null, null, null);
	}

	/**
	 * Instantiates a new account.
	 *
	 * @param id the id
	 * @param routingNumber the routing number
	 * @param accountNumber the account number
	 * @param accountType the account type
	 */
	public Account(Integer id, String routingNumber, String accountNumber, AccountType accountType) {
		super();
		this.id = id;
		this.routingNumber = routingNumber;
		this.accountNumber = accountNumber;
		this.accountType = accountType;
	}

	/**
	 * Gets the id.
	 *
	 * @return the id
	 */
	public Integer getId() {
		return this.id;
	}

	/**
	 * Sets the id.
	 *
	 * @param id the new id
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * Gets the routing number.
	 *
	 * @return the routing number
	 */
	public String getRoutingNumber() {
		return this.routingNumber;
	}

	/**
	 * Sets the routing number.
	 *
	 * @param routingNumber the new routing number
	 */
	public void setRoutingNumber(String routingNumber) {
		this.routingNumber = routingNumber;
	}

	/**
	 * Gets the account number.
	 *
	 * @return the account number
	 */
	public String getAccountNumber() {
		return this.accountNumber;
	}

	/**
	 * Sets the account number.
	 *
	 * @param accountNumber the new account number
	 */
	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

	/**
	 * Gets the account type.
	 *
	 * @return the account type
	 */
	public AccountType getAccountType() {
		return this.accountType;
	}

	/**
	 * Sets the account type.
	 *
	 * @param accountType the new account type
	 */
	public void setAccountType(AccountType accountType) {
		this.accountType = accountType;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("\nId: " + this.id);
		sb.append("\nRouting Number: " + this.routingNumber);
		sb.append("\nAccount Number: " + this.accountNumber);
		sb.append("\nAccount Type: " + AccountType.toString(this.accountType));

		return sb.toString();
	}

}
